
var ProManDefinition = new Object();

ProManDefinition.createView = function() {
	var view = new WindView();
	view.hide();
	
	var layoutView = WindLayout.createView();
	view.addView(layoutView);
	
	var rowView = layoutView.createRowView();
	
	{
		var cellView = rowView.createCellView();
		
		var actionsView = ProManDefinition.createActionsView();
		cellView.addView(actionsView);
	}
	
	{
		var cellView = rowView.createCellView();
		
		var cmd = new Object();
		cmd.operation = "datastore.list";
		cmd.type = "taskDefinition";
		cmd.filters = new Array();
		{
			var filter = new Object();
			filter.property = "parent";
			filter.operator = "=";
			filter.value = null;
			cmd.filters[cmd.filters.length] = filter;
		}
		
		var tasksViews = new WindView();
		tasksViews.setId("tasks");
		view.addView(tasksViews);
		
		var tasksDefinitionsView = TasksDefinitions.createTableView();
		cellView.addView(tasksDefinitionsView);	
	}
	
	//var crumbsModel = WindCrumbs.createModel();
	//var crumbsView = WindCrumbs.createView(crumbsModel);
	//crumbsView.setId("crumbs");
	//view.addView(crumbsView);

	
	return view;	
} 

ProManDefinition.createActionsView = function(model) {
	var actionsModel = new WindPanelModel();
	actionsModel.addTextEntry("New")
	actionsModel.addTextEntry("Reload")
	actionsModel.addTextEntry("Delete")
	actionsModel.addTextEntry("Print")
	actionsModel.addSeparator();
	actionsModel.addTextEntry("Planning");
	actionsModel.addTextEntry("Tracking");
	actionsModel.addSeparator();
	actionsModel.addTextEntry("Follow");
	actionsModel.addSeparator();
	actionsModel.addTextEntry("Versions");
	actionsModel.addSeparator();
	actionsModel.addTextEntry("Roles");
	actionsModel.addSeparator();
	actionsModel.addTextEntry("Links");
	actionsModel.addSeparator();
	actionsModel.addTextEntry("Attachments");
	actionsModel.addSeparator();
	actionsModel.addTextEntry("Comments");
	actionsModel.addSeparator();
	actionsModel.addTextEntry("Tags");
	actionsModel.addSeparator();
	actionsModel.addTextEntry("History");

	var actionsView = WindPanel.createView(actionsModel);
	actionsView.setId("TaskDefinition_Actions");
	return actionsView;
}
